package com.huayue.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huayue.dao.UserDao;
import com.huayue.entity.User;

/**
 * 后台登录用户
 * 
 */
@Service
public class UserService {
    @Autowired
    UserDao userDao;

    /**
     * 用户登录
     */
    public Map<String, Object> login(User user) {

        return userDao.login(user);
    }

    /**
     * 查询一个用户账户（手机号）是否存在
     */
    public Map<String, Object> findOneByPhone(User user) {
        return userDao.findOneByPhone(user);
    }

    /**
     * 用户修改密码
     */
    public int updatePassword(User user) {
        return userDao.updatePassword(user);
    }
}
